package com.heima.platform.controller.v1;

import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.platform.dtos.AdUserDto;
import com.heima.platform.service.AdUserService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author tmh
 * @date 2023/8/27 16:07
 * @description 管理员登录
 */
@Slf4j
@RestController
public class AdminLoginController {

    @Autowired
    private AdUserService adUserService;

    /**
     * 管理员用户登录
     * @param adUserDto
     * @return
     */
    @PostMapping("/login/in")
    public ResponseResult adminLogin(@RequestBody AdUserDto adUserDto) {
        return adUserService.adminUserLogin(adUserDto);
    }
}
